package com.ruoyi.repn.controller.front;

import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.repn.domain.params.UserLoginParams;
import com.ruoyi.repn.service.IRepUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cpf
 * @date 2024/3/4 10:31
 * @description
 */
@RestController
@RequestMapping("/front")
public class LoginController {

    @Autowired
    private IRepUserService repUserService;

    /**
     * 登录方法
     *
     * @param userLoginParams 登录信息
     * @return 结果
     */
    @PostMapping("/login")
    public AjaxResult login(@RequestBody @Validated UserLoginParams userLoginParams)
    {
        return repUserService.login(userLoginParams);
    }


}
